package com.ingrun.tuboshu.utils;

import cn.dev33.satoken.secure.BCrypt;

public class PasswordUtil {

    public static String encryptPassword(String username, String password) {
        return BCrypt.hashpw(username + password, BCrypt.gensalt());
    }

    public static boolean checkPassword(String username, String password, String dbPassword) {
        return BCrypt.checkpw(username + password, dbPassword);
    }

}
